package com.sp.es.modal;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * ES专用对象与BO对象类字段保持一致
 * @author haifeng
 *
 */
public class UniDeputyAccount implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -6137082948901623300L;
	
	//副账号标识
    @Field(type = FieldType.Long)
	private Long deputyAccountId;
    //用户标识
    @Field(type = FieldType.Long)
    private Long accountId;
    //员工工号
    @Field(type = FieldType.Keyword)
    private String staffCode;
    //副账号名称
    @Field(type = FieldType.Text)
    private String deputyAccountName;
    //是否默认
    @Field(type = FieldType.Keyword)
    private String isDefault;
    //副账号
    @Field(type = FieldType.Keyword)
    private String deputyAccountNumber;
    //账号状态
    @Field(type = FieldType.Keyword)
    private String accountStatus;
    //来源系统
    @Field(type = FieldType.Keyword)
    private String originalSystem;
    //外部副账号标识
    @Field(type = FieldType.Keyword)
    private String originalDeputyAccountId;
    //副账号手机号码
    @Field(type = FieldType.Keyword)
    private String phoneNumber;
    //副账号email
    @Field(type = FieldType.Keyword)
    private String email;
    //生效日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date validDate;
    //失效日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date expireDate;
    //数据状态
    @Field(type = FieldType.Keyword)
    private String dataStatus;
    //创建日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;
    //创建操作员编码
    @Field(type = FieldType.Keyword)
    private String createOpId;
    //创建组织编码
    @Field(type = FieldType.Keyword)
    private String createOrgId;
    //事务编号
    @Field(type = FieldType.Keyword)
    private Long doneCode;
    //操作日期
    @Field(type= FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date doneDate;
    //操作员编码
    @Field(type = FieldType.Keyword)
    private String opId;
    //操作组织编码
    @Field(type = FieldType.Keyword)
    private String orgId;
    //数据归属地区
    @Field(type = FieldType.Keyword)
    private String regionId;
    //副账号公司
    @Field(type = FieldType.Keyword)
    private String company;
    //岗位列表
    @Field(type = FieldType.Nested)
    private List<UniDeputyRelat> uniDeputyRelats;
	public Long getDeputyAccountId() {
		return deputyAccountId;
	}
	public void setDeputyAccountId(Long deputyAccountId) {
		this.deputyAccountId = deputyAccountId;
	}
	public Long getAccountId() {
		return accountId;
	}
	public void setAccountId(Long accountId) {
		this.accountId = accountId;
	}
	public String getStaffCode() {
		return staffCode;
	}
	public void setStaffCode(String staffCode) {
		this.staffCode = staffCode;
	}
	public String getDeputyAccountName() {
		return deputyAccountName;
	}
	public void setDeputyAccountName(String deputyAccountName) {
		this.deputyAccountName = deputyAccountName;
	}
	public String getIsDefault() {
		return isDefault;
	}
	public void setIsDefault(String isDefault) {
		this.isDefault = isDefault;
	}
	public String getDeputyAccountNumber() {
		return deputyAccountNumber;
	}
	public void setDeputyAccountNumber(String deputyAccountNumber) {
		this.deputyAccountNumber = deputyAccountNumber;
	}
	public String getAccountStatus() {
		return accountStatus;
	}
	public void setAccountStatus(String accountStatus) {
		this.accountStatus = accountStatus;
	}
	public String getOriginalSystem() {
		return originalSystem;
	}
	public void setOriginalSystem(String originalSystem) {
		this.originalSystem = originalSystem;
	}
	public String getOriginalDeputyAccountId() {
		return originalDeputyAccountId;
	}
	public void setOriginalDeputyAccountId(String originalDeputyAccountId) {
		this.originalDeputyAccountId = originalDeputyAccountId;
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public Date getValidDate() {
		return validDate;
	}
	public void setValidDate(Date validDate) {
		this.validDate = validDate;
	}
	public Date getExpireDate() {
		return expireDate;
	}
	public void setExpireDate(Date expireDate) {
		this.expireDate = expireDate;
	}
	public String getDataStatus() {
		return dataStatus;
	}
	public void setDataStatus(String dataStatus) {
		this.dataStatus = dataStatus;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public String getCreateOpId() {
		return createOpId;
	}
	public void setCreateOpId(String createOpId) {
		this.createOpId = createOpId;
	}
	public String getCreateOrgId() {
		return createOrgId;
	}
	public void setCreateOrgId(String createOrgId) {
		this.createOrgId = createOrgId;
	}
	public Long getDoneCode() {
		return doneCode;
	}
	public void setDoneCode(Long doneCode) {
		this.doneCode = doneCode;
	}
	public Date getDoneDate() {
		return doneDate;
	}
	public void setDoneDate(Date doneDate) {
		this.doneDate = doneDate;
	}
	public String getOpId() {
		return opId;
	}
	public void setOpId(String opId) {
		this.opId = opId;
	}
	public String getOrgId() {
		return orgId;
	}
	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}
	public String getRegionId() {
		return regionId;
	}
	public void setRegionId(String regionId) {
		this.regionId = regionId;
	}
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public List<UniDeputyRelat> getUniDeputyRelats() {
		return uniDeputyRelats;
	}
	public void setUniDeputyRelats(List<UniDeputyRelat> uniDeputyRelats) {
		this.uniDeputyRelats = uniDeputyRelats;
	}
}
